home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac100% 1998 November
/
MAC100-1998-11.ISO.7z
/
MAC100-1998-11.ISO
/
オンラインソフト定点観測
/
ユーティリティ
/
Mops 3.2.sea
/
Mops 3.2
/
Mops source
/
More classes
/
StringArray
< prev
next >
Wrap
Text File
|
1998-07-02
|
892b
|
53 lines
¥ StringArray - MRH May 86.
¥ This class adds suitable indexed methods to the class Bytestring.
¥ need bytestring
:class STRINGARRAY super{ string+ array }
int CURRENT
:m CURRENT:
get: current ;m
:m (SEL): { idx -- }
idx put: current
idx ^elem4 @ ^base !
nil?: self ?EXIT
^base size: handle put: size ;m
:m SELECT: { idx -- }
idx (sel): self
nil?: self
IF ¥ new: not done - do it now
new: super
handle: self idx ^elem4 !
ELSE
reset: self
THEN ;m
:m NEW: ;m ¥ Not needed now, as select: does it if necessary.
:m RELEASE:
limit 0 DO
i (sel): self release: super ¥ Harmless if not open
nilH i ^elem4 !
LOOP ;m
:m CLEARALL:
limit 0 DO
i (sel): self
handle: self IF clear: super THEN
LOOP ;m
:m DUMP:
." Current:" get: current . cr
dump: super ;m
:m CLASSINIT:
idxbase limit 4* bounds
DO nilH i ! 4 +LOOP ;m
;class